<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Cache-control" content="no-cache" />
    <title>表单发布</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Pragma" content="no-cache">
    <meta name="description" content="">
    <meta name="keywords" content="" />
    <link rel="stylesheet" type="text/css" href="static/css/aui.2.0.css">
    <script src="http://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
	<header class="aui-bar aui-bar-nav" style="background-color: #3c445e;">
        <a onclick="history.back()" class="aui-pull-left">
            <i class="aui-iconfont aui-icon-left"></i>
        </a>
        <div class="aui-title">回复</div>
    </header>

    <form action="">
        <div>
            <div class="publish-article-title">
                <div class="title-tips">标题</div>
                <input type="text" id="title" placeholder="文章标题">
            </div>

            <div class="aui-padded f12 txt-muted">
                <span>引用 x楼 白老师</span>
                <div class="quote-content">照片说明：攀登四姑娘山三峰，在二峰和三峰之间的垭口,太阳就慢慢露了出来，雪山上的日出，真</div>
            </div>


            <div class="publish-article-content">
                <div class="article-content" id="content"></div>
            </div>
        </div>

        <div class="aui-padded aui-border-t bg-f">
            <div class="aui-row-padded aui-row" id="ossfile"></div>
            <div id="console"></div>
        </div>

        <div class="aui-border-tb bg-f" id="container">
            <img class="aui-padded" src="static/images/icon_smile.png" style="width: 2.5rem;vertical-align: top;" onclick="toOpenFace()">
            <img class="aui-padded" id="selectfiles" src="static/images/icon_img.png" style="width: 2.5rem;vertical-align: top;">
            
            <input type="file" id="file_list">

            <div class="aui-pull-right">
                <button type="submit" class="aui-btn aui-btn-info aui-margin-t-10 aui-margin-r-15">发布</button>
            </div>
        </div>
    </form>
</body>

<script src="static/js/loader.js"></script>
<script type="text/javascript">

window.serverUrl = './get.php';        //获取签名接口
window.filename_pre = '34_';    //上传返回的文件名前缀，届时请替换成USER_ID

// .setGlobalDefaults({BasePath:'/123/'})
$LAB
.css('static/css/arteditor.css')
.script('static/js/plupload-2.1.2/js/plupload.full.min.js','static/js/upload.js')
.script('static/js/arteditor.js').wait(function(){
    var arteditor = $('#content').artEditor({
        imgTar: '#imageUpload',
        limitSize: 5,   // 兆
        showServer: false,
        data: {},
        uploadField: 'image',
        breaks: false,
        placeholader: '请输入回复内容',
        validHtml: ["<br/>"],
        formInputId: 'target',
    });

    toOpenFace = function(){
        var face = openFace(function(){
            var img = ' <img src="' + this.src + '" style="max-width:100%;" /> '
            arteditor.insertImage(img);
            face.closed();
        })
    };


    $('#ossfile').on('click', 'img.eui-wmax', function(){
        var img = '<p> <img src="' + this.src + '" style="max-width:100%;" /> </p>'
        arteditor.insertImage(img);
    })

    $('#submit').on('click', function(){
        $('#content').val( $('.article-content').html() )
        $('#reply_add').submit();
    })
})
</script>
</html>

